/*
 * DateTime.h
 *
 *  Created on: 2011-11-17
 *      Author: kaishui
 */

#ifndef DATETIME_H_
#define DATETIME_H_


#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <mysql.h>
#include <string.h>
#include <list>
#include <cassert>
#include <typeinfo>

#include <time.h>


using namespace std;

class DateTime
{
public:
	static int GetCurTime(){return (int)time(NULL);};
	static int GetCurDate();
	static string GetNowTime();
	static string GetNowDate();
	static string GetNowDateTime();
	static int str2time(string strTime);
	static string time2str(int time,bool bDate);

	static string GetTmtTime(time_t t);
	static string GetTmtDate(time_t t);
private:
//	static string m_strTime;
};

#endif /* DATETIME_H_ */
